package com.android.kotlincoroutinemvvmdemo.viewmodel
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.cancel

open class BaseViewModel : ViewModel(), CoroutineScope by MainScope() {
    override fun onCleared() {
        super.onCleared()
        cancel()
    }
}